import React from "react";
import { Button,  } from "antd";
import {  Outlet ,useNavigate} from "react-router-dom";
import { _getAds, _changePng, _delete } from "./Api";


const Ads = () => {

    const navigate = useNavigate()

  const onAdd = () => {
    navigate("/home/ads/add_ads");
  };

  return (
    <>
      <h1>广告管理</h1>
      <p>
        广告信息展示，可以进行新增广告、更改广告、删除广告操作。注意：最多只允许5个广告位
      </p>
      <Button type="primary" onClick={onAdd} className="addBtn">
        新增广告
      </Button>
      

      <Outlet/>

      
    </>
  );
};

export default Ads;
